\section{Strings trimming}
\newcommand{\CRLF}{\ac{CR}/\ac{LF}}

A very common string processing task is to remove some characters at the start and/or at the end.

In this example, we are going to work with a function which removes all newline characters 
(\CRLF{}) from the end of the input string:

\lstinputlisting[style=customc]{\CURPATH/strtrim_EN.c}

The input argument is always returned on exit, this is convenient when you want to chain 
string processing functions, like it has done here in the \main function.

\myindex{\CLanguageElements!Short-circuit}
The second part of for() (\TT{str\_len>0 \&\& (c=s[str\_len-1])}) is the so called \q{short-circuit} 
in \CCpp and is very convenient \InSqBrackets{\CNotes 1.3.8}.

The \CCpp compilers guarantee an evaluation sequence from left to right.

So if the first clause is false after evaluation, the second one is never to be evaluated.

% subsections
\input{\CURPATH/x64_EN}
\input{\CURPATH/ARM64_EN}
\input{\CURPATH/ARM_EN}
\input{\CURPATH/MIPS_EN}

